package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;
import static org.jsola.hr.example.CrmMemberRelationExample.E_MEMER_ID;
import static org.jsola.hr.example.CrmMemberRelationExample.E_SUPERIOR_MEMBER_ID;
import static org.jsola.hr.example.CrmMemberRelationExample.M_MEMER_ID_MAX;
import static org.jsola.hr.example.CrmMemberRelationExample.M_MEMER_ID_NOT_NULL;
import static org.jsola.hr.example.CrmMemberRelationExample.M_SUPERIOR_MEMBER_ID_MAX;
import static org.jsola.hr.example.CrmMemberRelationExample.M_SUPERIOR_MEMBER_ID_NOT_NULL;
import static org.jsola.hr.example.CrmMemberRelationExample.N_MEMER_ID;
import static org.jsola.hr.example.CrmMemberRelationExample.N_SUPERIOR_MEMBER_ID;

/**
 * 成员关系表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【成员关系表】的参数")
@Data
public class CrmMemberRelationUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private String id;

    @ApiModelProperty(notes = N_MEMER_ID, example = E_MEMER_ID, required = true)
    @NotNull(message = M_MEMER_ID_NOT_NULL)
    @Length(max = 32, message = M_MEMER_ID_MAX)
    private String memerId;

    @ApiModelProperty(notes = N_SUPERIOR_MEMBER_ID, example = E_SUPERIOR_MEMBER_ID, required = true)
    @NotNull(message = M_SUPERIOR_MEMBER_ID_NOT_NULL)
    @Length(max = 32, message = M_SUPERIOR_MEMBER_ID_MAX)
    private String superiorMemberId;


}

